import Vue from 'vue'
import Router from 'vue-router'

import Home from '../components/Home'
import Login from '../components/Login'
import Register from '../components/Register'
import Course from '../components/Course'
import Detail from '../components/Detail'
import Player from '../components/Player'
import Cart from '../components/Cart'
import Order from '../components/Order'
import Success from '../components/Success'
import User from '../components/User'
import UserOrder from '../components/UserOrder'

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      name: 'Home',
      path: '/',
      component: Home,
    },
    {
      name: 'Home',
      path: '/home',
      component: Home,
    },
    {
      name: 'Login',
      path: '/login',
      component: Login,
    },
    {
      name: 'Register',
      path: '/register',
      component: Register,
    },
    {
      name: 'Course',
      path: '/course',
      component: Course,
    },
    {
      name: 'Detail',
      path: '/detail',
      component: Detail,
    },
    {
      name: "Player",
      path: "/player",
      component: Player,
    },
    {
      name: 'Cart',
      path: '/cart',
      component: Cart,
    },
    {
      name: 'Order',
      path: '/orders/:order',
      component: Order,
    },
    {
      name: 'Success',
      path: '/success',
      component: Success,
    },
    {
      name: 'User',
      path: '/my',
      component: User,
    },
    {
      name: 'UserOrder',
      path: '/my/order',
      component: UserOrder,
    }
  ]
})

